package tcp;

import java.io.PrintWriter;
import java.net.Socket;
import java.util.Scanner;


public class chatclient {
	public static void main(String[] args) throws Exception{
		Socket soc=new Socket("127.0.0.1",8080);
		PrintWriter out=new PrintWriter(soc.getOutputStream(),true);
		String request="chieu nay di hoc..";
		out.println(request);
		
		Scanner input=new Scanner(soc.getInputStream());
		String response=input.nextLine();
		System.out.println(response);
		input.close();soc.close();
	}
}
